#include <stdio.h>
#include <string.h>

int main(int argc, char *argv[])
{
	char s[16], buf[2];
	scanf("%s", s);

	int len = strlen(s), i, sum = 0, cnt = 1, checksum;
	buf[1] = '\0';
	for (i = 0; i < len - 1; i++) {
		if (s[i] != '-') {
			buf[0] = s[i];
			sum += atoi(buf) * cnt;
			cnt++;
		}
	}

	checksum = sum % 11;

	if (checksum == 10) {
		if (s[len-1] == 'X') {
			printf("Right\n");
		} else {
			for (i = 0; i < len-1; i++) {
				fputc(s[i], stdout);
			}
			printf("X");
		}
	} else {
		buf[0] = s[len-1];
		if (checksum == atoi(buf)) {
			printf("Right\n");
		} else {
			for (i = 0; i < len-1; i++) {
				fputc(s[i], stdout);
			}
			printf("%d", checksum);
		}
	}
	printf("\n");

	return 0;
}
